package com.qf.day61.entity;

public class R {
    private R() {
    }

    private String code;
    private String desc;
    private Object data;

    public static R ok() {
        return new R().code("10000");
    }

    public static R fail() {
        return new R().code("Error");
    }

    public R code(String code) {
        this.code = code;
        return this;
    }

    public R desc(String desc) {
        this.desc = desc;
        return this;
    }

    public R data(Object data) {
        this.data = data;
        return this;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public Object getData() {
        return data;
    }
}